package com.playmodule.vr.utils;

public class FormatHelper
{
  public static String getTimeString(double millis)
  {
    StringBuffer buf = new StringBuffer();
    int hours = (int)(millis / 3600000.0);
    int minutes = (int)((millis % 3600000.0) / 60000.0);
    int seconds = (int)((millis % 3600000.0) % 60000 / 1000.0);
    if(hours > 0) {
      buf.append(String.format("%02d", hours));
      buf.append(":");
    }
    buf.append(String.format("%02d", minutes));
    buf.append(":");
    buf.append(String.format("%02d", seconds));
    return buf.toString();
  }
}
